import "../App.css";
import { Link, Routes, Route, Outlet, useLoaderData } from "react-router-dom";

function App() {
  // const homeData = useLoaderData();

  return (
    <div style={{ padding: '20px' }}>
      <h1>Home Page</h1>
      {/* <p>Home Data: {JSON.stringify(homeData)}</p> */}
      
      {/* 导航链接 - 跳转到子页面 */}
      <nav style={{ margin: '20px 0', padding: '10px', border: '1px solid #ccc' }}>
        <Link to="/dashboard" style={{ marginRight: '15px' }}>Dashboard</Link>
        <Link to="/profile" style={{ marginRight: '15px' }}>Profile</Link>
        <Link to="/settings">Settings</Link>
      </nav>
      
      {/* 子页面渲染出口 */}
      <Outlet />
    </div>
  );
}

export default App;
